package me.derekng.client;

import feign.Headers;
import feign.Param;
import feign.RequestLine;
import feign.Response;
import me.derekng.client.entity.Customer;

/**
 * Created by DerekNg on 2017/6/3.
 */
public interface FeignCustomerService {

    @RequestLine("GET /customers")
    String getCustomers();
    @RequestLine("DELETE /customers")
    Response deleteCustomers();

    @RequestLine("GET /customer/{id}")
    String getCustomer(@Param("id") Long id);

    @RequestLine("POST /customer")
    @Headers({"Content-Type: application/json","Accept: application/json"})
    Response addCustomer(Customer customer);

    @RequestLine("PUT /customer")
    @Headers({"Content-Type: application/json","Accept: application/json"})
    Response updateCustomer(Customer customer);

    @RequestLine("DELETE /customer/{id}")
    Response deleteCustomer(@Param("id") Long id);
}
